package demo3;

public class Test {

    public static void main(String[] args)throws CloneNotSupportedException{
        Person person1 = new Person("zhangsan", 10, 10.9);
        Person person2 = (Person) person1.clone();

        System.out.println(person1.m.money);
        System.out.println(person2.m.money);
        System.out.println("=================");

        person2.m.money = 19.99;

        System.out.println(person1.m.money);
        System.out.println(person2.m.money);
    }
    public static void main1(String[] args) throws CloneNotSupportedException{
        Person person = new Person("zhangsan", 20, 10.3);
        Person person1 = (Person) person.clone();
        System.out.println(person1);
    }
}
